import Vue from 'vue'
import VueRouter from 'vue-router'
import VideoPlay from '../views/VideoPlay.vue'
import MovieView from '../views/MovieView.vue'
import MyView from '../views/MyView.vue'
import VideoView from '../views/VideoView.vue'
import SearchMovieList from '../views/SearchMovieList.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name:'movie',
    component: MovieView
  },
  {
    path: '/video',
    component: VideoView,
  },
  {
    path: '/my',
    component: MyView,
  },
  {
    path: '/searchmovie',
    name:'searchmovie',
    component: SearchMovieList,
  },
  {
    path:'/play',
    name:'videoplay',
    component:VideoPlay,
    props($route){
      return {
        vlist:$route.params.vlist
      }
    },
  },
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
